home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 05 - 1989 / 05.08 Aug 89 / MacApp Intro Source / Sample.r < prev    next >
Encoding:
Text File  |  1989-06-26  |  4.0 KB  |  210 lines  |  [TEXT/MPS ]

  1. #ifndef __MacAppTypes__
  2. #include "MacAppTypes.r"
  3. #endif
  4.  
  5. #include "SysTypes.r"
  6.  
  7. #if qDebug
  8. include "Debug.rsrc";
  9. #endif
  10. include "MacApp.rsrc";
  11. include "Printing.rsrc";
  12.  
  13. include "Sample" 'CODE';    /* include CODE resources from compile/link  */
  14.  
  15. /*  cAboutApp, cNew, etc. defined in "{MARIncludes}MacAppTypes.r"  */
  16. #define  kWindRsrcID         1001
  17. #define  kPrinterStringID     1001            /* STR  resource ID */
  18. #define  kMacStringID         1002            /* STR  resource ID */
  19. #define    kFontStringId         1003
  20. #define  cMac                     2001            /* menu command number */
  21. #define  cPrinter                2002            /* menu command number */
  22.  
  23. resource 'vers' (1) {
  24.     0x00, 0x95, beta, 0x2, verUS,
  25.     "0.95b2",
  26.     "0.95 b2 (US), ©1989 MacTutor"
  27. };
  28.  
  29. resource 'vers' (2) {
  30.     0x05, 0x08, development, 0x02, verUS,
  31.     "Vol. 5 No. 8",
  32.     "MacTutor, Vol. 5 No. 8"
  33. };
  34.  
  35. resource 'STR ' (kPrinterStringID) {
  36.     "This is the printer (Driver)";
  37. };
  38.     
  39. resource 'STR ' (kMacStringID) {
  40.     "This is the Mac";
  41. };
  42.  
  43. resource 'STR ' (kFontStringID) {
  44.     "times";
  45. };
  46.  
  47. resource 'cmnu' (1) {
  48.     1,
  49.     textMenuProc,
  50.     0x7FFFFFFD,
  51.     enabled,
  52.     apple,
  53.      {    
  54.         "About Sample…", noIcon, noKey, noMark, plain, cAboutApp;    
  55.         "-", noIcon, noKey, noMark, plain, nocommand
  56.     }
  57. };
  58.  
  59. resource 'cmnu' (2) {
  60.     2,
  61.     textMenuProc,
  62.     0x7FFFFBBB,
  63.     enabled,
  64.     "File",
  65.      {
  66.         "New", noIcon, "N", noMark, plain, cNew;
  67.         "Open…", noIcon, "O", noMark, plain, cOpen;
  68.         "-", noIcon, noKey, noMark, plain, nocommand;
  69.         "Close", noIcon, "W", noMark, plain, cClose;
  70.         "Save", noIcon, "S", noMark, plain, cSave;
  71.         "Save As…", noIcon, noKey, noMark, plain, cSaveAs;
  72.         "Save a Copy In…", noIcon, noKey, noMark, plain, cSaveCopy;
  73.         "-", noIcon, noKey, noMark, plain, nocommand;
  74.         "Page Setup…", noIcon, noKey, noMark, plain, cPageSetup;
  75.         "Print One", noIcon, noKey, noMark, plain, cPrintOne;
  76.         "Print…", noIcon, "P", noMark, plain, cPrint;
  77.         "-", noIcon, noKey, noMark, plain, nocommand;
  78.         "Quit", noIcon, "Q", noMark, plain, cQuit
  79.     }
  80. };
  81.  
  82. resource 'cmnu' (3) {
  83.     3,
  84.     textMenuProc,
  85.     0x7FFFFFBD,
  86.     enabled,
  87.     "Edit",
  88.      {
  89.         "Undo", noIcon, "Z", noMark, plain, cUndo;
  90.         "-", noIcon, noKey, noMark, plain, nocommand;
  91.         "Cut", noIcon, "X", noMark, plain, cCut;
  92.         "Copy", noIcon, "C", noMark, plain, cCopy;
  93.         "Paste", noIcon, "V", noMark, plain, cPaste;
  94.         "Clear", noIcon, noKey, noMark, plain, cClear;
  95.         "-", noIcon, noKey, noMark, plain, nocommand;
  96.         "Show Clipboard", noIcon, noKey, noMark, plain, cShowClipboard
  97.     }
  98. };
  99.  
  100. resource 'cmnu' (4) {
  101.     4,
  102.     textMenuProc,
  103.     0x7FFFFFBD,
  104.     enabled,
  105.     "Sample",
  106.      {
  107.         "Query Mac", noIcon, "M", noMark, plain, cMac;
  108.         "-", noIcon, noKey, noMark, plain, nocommand;
  109.         "Query Printer", noIcon, "P", noMark, plain, cPrinter;
  110.     }
  111. };
  112.  
  113. resource 'MBAR' (128) {
  114.     {1; 2; 3; 4}
  115. };
  116.  
  117. resource 'WIND' (kWindRsrcID, purgeable) {
  118.     {50, 40, 375, 450},
  119.     zoomDocProc,
  120.     invisible,
  121.     goAway,
  122.     0x0,
  123.     "<<<>>>"
  124. };
  125.  
  126. resource 'SIZE' (-1) {
  127.     saveScreen,
  128.     acceptSuspendResumeEvents,
  129.     enableOptionSwitch,
  130.     canBackground,
  131.     MultiFinderAware,
  132.     backgroundAndForeground,
  133.     dontGetFrontClicks,
  134.     ignoreChildDiedEvents,
  135.     is32BitCompatible,
  136.     reserved, reserved, reserved, reserved, reserved, reserved, reserved,
  137. #if qDebug
  138.     340 * 1024,
  139.     320 * 1024
  140. #else
  141.     150 * 1024,
  142.     120 * 1024
  143. #endif
  144. };
  145.  
  146. resource 'seg!' (256,
  147. #if qNames
  148. "Sample",
  149. #endif
  150.     purgeable) {
  151.     {    "GTerminate";
  152.         "GNonRes";
  153.         "GOpen";
  154.         "GWriteFile";
  155.         "GFile";
  156.         "GClose";
  157.         "GClipBoard";
  158.         "GDoCommand";
  159.         "MAView";
  160.         "GSelCommand";
  161.     }
  162. };
  163.  
  164. resource 'mem!' (256,
  165. #if qNames
  166. "Sample",
  167. #endif
  168.     purgeable) {
  169.     43 * 1024,        /* Add to temporary reserve */
  170.     0,                    /* Add to permanent reserve */
  171.     0                    /* Add to stack space */
  172. };
  173.  
  174. resource 'DITL' (201, purgeable) {
  175.      {    /* array DITLarray: 3 elements */
  176.         /* [1] */
  177.         {130, 182, 150, 262},
  178.         Button {
  179.             enabled,
  180.             "OK"
  181.         };
  182.         /* [2] */
  183.         {10, 80, 110, 270},
  184.         StaticText {
  185.             disabled,
  186.             "This program queries the printer & Mac"
  187.             "\n\nThis program was written "
  188.             "with MacApp 2.0b9 ® © 1985-1989 Apple Computer, Inc."
  189.         };
  190.         /* [3] */
  191.         {10, 20, 42, 52},
  192.         Icon {
  193.             disabled,
  194.             1
  195.         }
  196.     }
  197. };
  198.  
  199. resource 'ALRT' (201, purgeable) {
  200.     {90, 100, 250, 412},
  201.     201,
  202.     {
  203.         OK, visible, silent;
  204.         OK, visible, silent;
  205.         OK, visible, silent;
  206.         OK, visible, silent
  207.     }
  208. };
  209.  
  210.